home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kresources / configwidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  1.7 KB  |  59 lines

  1. /*
  2.     This file is part of libkresources.
  3.     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
  4.     Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
  5.  
  6.     This library is free software; you can redistribute it and/or
  7.     modify it under the terms of the GNU Library General Public
  8.     License as published by the Free Software Foundation; either
  9.     version 2 of the License, or (at your option) any later version.
  10.  
  11.     This library is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.     Library General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU Library General Public License
  17.     along with this library; see the file COPYING.LIB.  If not, write to
  18.     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  19.     Boston, MA 02110-1301, USA.
  20. */
  21.  
  22. #ifndef KRESOURCES_CONFIGWIDGET_H
  23. #define KRESOURCES_CONFIGWIDGET_H
  24.  
  25. #include "resource.h"
  26.  
  27. #include <kconfig.h>
  28.  
  29. #include <qwidget.h>
  30.  
  31. namespace KRES {
  32.  
  33. class KRESOURCES_EXPORT ConfigWidget : public QWidget
  34. {
  35.     Q_OBJECT
  36.   public:
  37.     ConfigWidget( QWidget *parent = 0, const char *name = 0 );
  38.  
  39.     /**
  40.       Sets the widget to 'edit' mode. Reimplement this method if you are
  41.       interested in the mode change (to disable some GUI element for
  42.       example). By default the widget is in 'create new' mode.
  43.     */
  44.     virtual void setInEditMode( bool value );
  45.  
  46.   public slots:
  47.     virtual void loadSettings( Resource *resource ) = 0;
  48.     virtual void saveSettings( Resource *resource ) = 0;
  49.  
  50.   signals:
  51.     void setReadOnly( bool value );
  52.  
  53.   protected:
  54.     Resource *mResource;
  55. };
  56.  
  57. }
  58. #endif
  59.